import request from '@/utils/request'

// 查询裁判库列表
export function listReferee(query) {
  return request({
    url: '/work/libraryreferee/list',
    method: 'get',
    params: query
  })
}

// 查询裁判库详细
export function getReferee(id) {
  return request({
    url: '/work/libraryreferee/' + id,
    method: 'get'
  })
}

// 新增裁判库
export function addReferee(data) {
  return request({
    url: '/work/libraryreferee/saveOrUpdate',
    method: 'post',
    data: data
  })
}

// 修改裁判库
export function updateReferee(data) {
  return request({
    url: '/work/libraryreferee/saveOrUpdate',
    method: 'post',
    data: data
  })
}

// 删除裁判库
export function delReferee(id) {
  return request({
    url: '/work/libraryreferee/delete-by-id',
    method: 'get',
    params: { "id": id }
  })
}

export function delReferees(ids) {
  return request({
    url: '/work/libraryreferee/delete-by-ids',
    method: 'get',
    params: { "ids": ids }
  })
}

// 导出
export function exportReferees(query) {
  return request({
    url: '/work/libraryreferee/export',
    method: 'get',
    params: query
  })
}

